package com.ruoyi.biz.service.impl;

import java.util.List;

import com.ruoyi.biz.domain.query.BizBinningInternalQuery;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.biz.mapper.BizBinningInternalMapper;
import com.ruoyi.biz.domain.BizBinningInternal;
import com.ruoyi.biz.service.IBizBinningInternalService;

/**
 * 国内分箱Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-08-04
 */
@Service
public class BizBinningInternalServiceImpl implements IBizBinningInternalService 
{
    @Autowired
    private BizBinningInternalMapper bizBinningInternalMapper;

    /**
     * 查询国内分箱
     * 
     * @param id 国内分箱主键
     * @return 国内分箱
     */
    @Override
    public BizBinningInternal selectBizBinningInternalById(Long id)
    {
        return bizBinningInternalMapper.selectBizBinningInternalById(id);
    }

    /**
     * 查询国内分箱列表
     * 
     * @param bizBinningInternal 国内分箱
     * @return 国内分箱
     */
    @Override
    public List<BizBinningInternal> selectBizBinningInternalList(BizBinningInternalQuery query)
    {
        return bizBinningInternalMapper.selectBizBinningInternalList(query);
    }

    /**
     * 新增国内分箱
     * 
     * @param bizBinningInternal 国内分箱
     * @return 结果
     */
    @Override
    public int insertBizBinningInternal(BizBinningInternal bizBinningInternal)
    {
        bizBinningInternal.setCreateTime(DateUtils.getNowDate());
        return bizBinningInternalMapper.insertBizBinningInternal(bizBinningInternal);
    }

    /**
     * 修改国内分箱
     * 
     * @param bizBinningInternal 国内分箱
     * @return 结果
     */
    @Override
    public int updateBizBinningInternal(BizBinningInternal bizBinningInternal)
    {
        bizBinningInternal.setUpdateTime(DateUtils.getNowDate());
        return bizBinningInternalMapper.updateBizBinningInternal(bizBinningInternal);
    }

    /**
     * 批量删除国内分箱
     * 
     * @param ids 需要删除的国内分箱主键
     * @return 结果
     */
    @Override
    public int deleteBizBinningInternalByIds(Long[] ids)
    {
        return bizBinningInternalMapper.deleteBizBinningInternalByIds(ids);
    }

    /**
     * 删除国内分箱信息
     * 
     * @param id 国内分箱主键
     * @return 结果
     */
    @Override
    public int deleteBizBinningInternalById(Long id)
    {
        return bizBinningInternalMapper.deleteBizBinningInternalById(id);
    }
}
